1. Field of the Invention
Methods and apparatuses consistent with the present invention generally relate to processing an audio signal, and more particularly, to encoding a sinusoidal signal whose magnitude is less than a masking value according to a psychoacoustic model, and decoding an encoded sinusoidal signal.
2. Description of the Related Art
Parametric coding expresses an audio signal by a particular parameter. Parametric coding is used in the Moving Picture Experts Group (MPEG)-4 standard.
In parametric coding, parameters for audio components in each domain are extracted by performing three types of analysis, i.e., transient analysis, sinusoidal analysis, and noise analysis. The extracted parameters are formatted into a bitstream for transmission to a decoder.
After sinusoidal analysis, a sinusoidal signal is tracked for adaptive differential pulse code modulation (ADPCM) coding or differential pulse code modulation (DPCM) coding with respect to the sinusoidal signal. Tracking is a process of searching for sinusoidal components continuing from each other from among sinusoidal components included in previous and next frames and setting correspondence relationship between the found sinusoidal components.
A sinusoidal component of a current frame, which can be tracked from sinusoidal components of a previous frame, is referred to as a continuation sinusoidal component. Since difference-coding can be performed on continuation sinusoidal components using sinusoidal components of the previous frame, which correspond to the continuation sinusoidal components, the continuation sinusoidal components can be efficiently coded. A continuation sinusoidal component, which does not continue to a sinusoidal component of a next frame and disappears, is referred to as a death sinusoidal component.
On the other hand, a sinusoidal component of the current frame, which cannot be tracked from sinusoidal components of the previous frame, is referred to as a birth sinusoidal component. Difference-coding using sinusoidal components of the previous frame cannot be performed on a birth sinusoidal component and absolute-coding can be performed on the birth sinusoidal component. Thus, the birth sinusoidal component requires a large number of bits for encoding.
In encoding of audio data, attempts are made to reduce the number of bits of encoded data using a psychoacoustic model. FIG. 1A is a diagram for explaining a masking effect according to a psychoacoustic model.
As illustrated in FIG. 1A, when a particular audio signal 4 exists, sounds whose signal magnitudes are less than the magnitude of the audio signal 4 are not audible to human ears. A line expressing the minimum magnitude of a signal that is audile to human ears under existence of the particular audio signal 4 is called a masking curve 2 and a value of the masking curve 2 at a particular frequency is called a masking value.
Referring to FIG. 1A, the magnitude of a sinusoidal signal 6 is greater than a masking value and thus the sinusoidal signal 6 can be heard by human hears. Thus, the sinusoidal signal 6 must be encoded.
On the other hand, the magnitude of a sinusoidal signal 8 is less than the masking value and thus the sinusoidal signal 8 cannot be heard by human ears. For this reason, the sinusoidal signal 8 is not encoded in encoding using a psychoacoustic model. In other words, encoding using a psychoacoustic model processes a sinusoidal signal whose magnitude is less than a masking value as not existing.
FIG. 1B is a diagram for explaining how a sinusoidal signal whose magnitude is less than a masking value according to a psychoacoustic model is treated in sinusoidal tracking.
Referring to FIG. 1B, a sinusoidal signal 10 has a magnitude that is less than a masking value according to a psychoacoustic model. The magnitude of the sinusoidal signal 10 is less than the magnitudes of sinusoidal signals 18 and 20 within the same frame as the sinusoidal signal 10.
When the psychoacoustic model is not applied, the sinusoidal signal 10 is connected with a sinusoidal signal 12 of a previous frame and with a sinusoidal signal 14 of a next frame. Thus, tracking of the sinusoidal signal 12, the sinusoidal signal 10, and the sinusoidal signal 14 is performed, and thus difference coding that is applicable to a continuation sinusoidal signal can be performed on the sinusoidal signal 14.
However, when the psychoacoustic model is applied, signals whose magnitudes are less than the masking value are treated as not existing like in an empty place 16 treated as not having any signal.
When the psychoacoustic model is applied, the sinusoidal signal 10 is treated as not existing and thus the sinusoidal signal 14 is treated as a birth sinusoidal signal, requiring a large number of bits for encoding.
If signals whose magnitudes are less than the masking value according to the psychoacoustic model are treated as not existing, a sinusoidal signal of a next frame has to be coded as a birth sinusoidal signal.
Moreover, even when such signals whose magnitudes are less than the masking value are coded, problems still occur.
FIG. 2 is a flowchart illustrating a related art method for processing a signal whose magnitude is less than the masking value according to the psychoacoustic model.
First, sinusoidal tracking is performed in operation S10. It is assumed that P(n−2) and P(n−1) are connected and P(n−1) and P(n) are connected as a result of sinusoidal tracking.
In operation S20, P(n−1) is assumed to a signal having a magnitude that is less than the masking value according to the psychoacoustic model. Such a signal may have an amplitude of a small value or 0.
In operation S30, it is determined whether to code P(n−1) according to one of the previously mentioned two methods where the psychoacoustic model is applied or is not applied.
When the psychoacoustic model is applied and thus P(n−1) is treated as not existing, P(n−1) is not coded in operation S40 and P(n) that is a sinusoidal signal of a next frame is absolute-coded according to an encoding method for a birth sinusoidal signal in operation S50.
When it is determined to code P(n−1), difference coding between P(n−1) and P(n−2) is performed according to an encoding method for a continuation sinusoidal signal in operation S60 and difference coding between P(n) and P(n−1) is performed in operation S70.
As discussed above, when P(n−1) is not coded in operation S40, a large number of bits are required to code amplitude, frequency, and phase components because the encoding method for a birth sinusoidal signal is applied to P(n−1).
When P(n−1) is coded in operation S60, the number of bits used to code the frequency or amplitude component is small. However, since the amplitude of P(n−1) is small or equal to 0, a difference between the amplitude of P(n−1) and the amplitude of P(n−2) is very large. Also, the difference between the amplitude of P(n) and the amplitude of P(n−1) is very large. Thus, a large number of bits may be used to encode the difference or the difference may be in a range that cannot be expressed.
As such, in order to encode an audio signal including a sinusoidal signal whose magnitude is less than a masking value according to a psychoacoustic model using the related art method, a more number of bits than a case with coding of a general sinusoidal signal are required, degrading the efficiency of encoding.